/*
 * 	Copyright 2004-2005 Lookstone Technologies
 *	Written by Jason Seeley
 * 
 *	This file and other files in Lookstone.Common may be freely used, 
 *	modified, and distributed so long as this block remains intact 
 *  in each file it appears in.
 * 
 *	Lookstone Technologies does not warrant that any of this source code 
 *	is free from defect, and will not accept responsibility for any 
 *  failure of software using this library.  By using this library, 
 *  you agree to that Lookstone Technologies and the author of this file 
 *	are not liable for any damages or injuries caused through the use
 *	of this library.
 */

using System;
using System.Data;

namespace Lookstone.Data
{
	/// <summary>
	/// Summary description for IConnectionContext.
	/// </summary>
	public interface IConnectionContext : IDisposable
	{
		void Connect();
		void Connect(string connectionString);
		void Close();
		void ConnectCommand(IDbCommand cmd);

		string ConnectionString { get; set; }
		bool IsConnected { get; }
		bool IsTransacting { get; }

		void BeginTransaction();
		void CommitTransaction();
		void RollbackTransaction();
		void RollbackTransaction(Exception innerException);
	}
}